<h2>Confirmação de pedido</h2>
<h2>Produtos</h2>
<table>
  <tr><th>Produto</th><th>Quantidade</th></tr>
<% @purchase.purchase_items.each do |purchase_item| %>
  <tr>
    <td><%=  purchase_item.product_id %></td>
    <td><%=  purchase_item.quantity %></td>
  </tr>
<% end %>
</table>
<h2>Endereco de entrega</h2>
  <div class="field">
    <%= label_tag :zip, 'CEP' %><br/>
    <%= @purchase.delivery_address.zip %>
  </div>
  <div class="field">
    <%= label_tag :street, 'Rua' %><br/>
    <%= @purchase.delivery_address.street %>
  </div>
  <div class="field">
    <%= label_tag :number, 'Numero' %><br/>
    <%= @purchase.delivery_address.number %>
  </div>
  <div class="field">
    <%= label_tag :complement, 'Complemento' %><br/>
    <%= @purchase.delivery_address.complement %>
  </div>
  <div class="field">
    <%= label_tag :district, 'Bairro' %><br/>
    <%= @purchase.delivery_address.district %>
  </div>
  <div class="field">
    <%= label_tag :city, 'Cidade' %><br/>
    <%= @purchase.delivery_address.city %>
  </div>
  <div class="field">
    <%= label_tag :state, 'Estado' %><br/>
    <%= @purchase.delivery_address.state %>
  </div>
<h2>Forma de pagamento</h2>
<%= @purchase.payment_method.name %><br/>
<%= link_to "Finalizar", "/purchases/end_purchase" %>